package com.qcby.service.Impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.qcby.dao.TeacherMapper;
import com.qcby.entity.Student;
import com.qcby.entity.Teacher;
import com.qcby.service.TeacherService;

@Service("teacherService")
public class TeacherServiceImpl implements TeacherService {
	
	@Autowired
	private TeacherMapper teacherMapper;


	@Override
	public int add(Teacher teacher) {
		return teacherMapper.insert(teacher);
	}

	@Override
	public int del(Integer id) {
		return teacherMapper.deleteByPrimaryKey(id);
	}

	@Override
	public int update(Teacher teacher) {
		return teacherMapper.updateByPrimaryKey(teacher);
	}

	@Override
	public Teacher select(Integer id) {
		return teacherMapper.selectByPrimaryKey(id);
	}

	@Override
	public Teacher logincheck(Teacher teacher) {
		return teacherMapper.logincheck(teacher);
	}

	@Override
	public Teacher selectSec(Teacher teacher) {
		return teacherMapper.selectReturnSec(teacher);
	}

	
}
